package com.lzy.cloud.base.remote;

import com.lzy.framework.core.output.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(name = "lzy-cloud-member")
public interface MemberApi {

    /**
     * 根据卡券id获取
     * @param couponId
     * @return
     */
    @RequestMapping(value = "/member/coupon/find/by/coupon/id/{couponId}", method = RequestMethod.GET)
    @ResponseBody
    Result findByCouponId(@PathVariable("couponId") Long couponId);

    /**
     * 根据会员id查询会员
     * @param id
     * @return
     */
    @RequestMapping(value = "/member/detail/{id}", method = RequestMethod.GET)
    Result findByMemberId(@PathVariable("id") Long id);
}
